II Something
by Clark Hugh Stiles
November 7, 2001 

Machine Language and Assembly Language -- The miniassembler has changed over the years, but the changes have been improvements. Access the GS Monitor by launching BASIC.SYSTEM (or booting DOS 3.3), type CALL-151 (and hit Return), type the exclamation point, and then type the nine lines shown. The last line is a result of typing line nine. Hit Return at the end of each line. And note that the second through eighth lines have a space after the exclamation. You have to type that space. 

The eleventh line, "300G", is like CALL 768 from BASIC, and causes it to run. 
!300:JSR FC58
! LDA #$05
! STA 24
! STA 25
! JSR FC22
! JSR F941
! RTS
! [Return]
*300.30F
*300:20 58 FC A9 05 85 24 85 25 20 22 FC 20 41 F9 60
*300G 
This 16 byte routine clears the screen (FC58 is the HOME command), sets HTAB and VTAB to value 5, calls the equivalent of VTAB and HTAB simultaneously, then calls a routine which prints the Accumulator and X register as a four digit hex value at VTAB 5 and HTAB 5. Works quickly doesn't it? The result I get each time is 8000. I'm using it in version 5.0 of the B2TR emulator. 

These calls are documented somewhere, but I'm not too sure where. I think they occur somewhere in the text of Roger Wagner's book "Assembly Lines", because years ago I jotted them into one of the appendices. I've found some other odd CALLs in The Apple II Almanac, some of which still work, and I'll try to demonstrate those later. 

II Infinitum! 